<template>
  <div class="index">
    
    
    <div class="">
        <div class="search-condition">
          起止时间：
          <DatePicker type="date" format="yyyy-MM-dd" placeholder="请选择时间"></DatePicker>
          至
          <DatePicker type="date" format="yyyy-MM-dd" placeholder="请选择时间"></DatePicker>
          
          &nbsp;&nbsp;&nbsp;
          代金券状态：
          <Select v-model="tradeType" style="width:100px">
              <Option v-for="item in tradeTypes" :value="item.value" :key="item.value">{{ item.label }}</Option>
          </Select>
          
           <Button type="primary">查询</Button>
        </div>
        
        <div class="mt20">
          <Table stripe :columns="columns1" :data="data1">
            <template slot-scope="{ row, index }" slot="action">
              <Icon type="ios-paper c1" size="20" @click="gotoDetail(row)"/>
            </template>
          </Table>
        </div>
    </div>
  
    <div class="page mt20">
      <Page :total="100" show-sizer />
    </div> 
  
  </div>
</template>

<script>
  export default {
    data () {
      return{
        position:[
          {title: '财务管理', link:'/admin/moneyManage'},
          {title: '我的优惠券'}
        ],
        tradeType: '1',
        tradeTypes:[
          {label: '有效',value: '1'},
          {label: '失效',value: '2'},
        ],
        columns1: [
          {title: '编号', key: 'id'},
          {title: '金额（元）', key: 'address'},
          { title: '购买产品类型', key: 'address'},
          { title: '生效时间/失效时间', key: 'address'},
          { title: '状态', key: 'address'},
          { title: '备注', key: 'address'},
         
         ],
         data1:[
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           {
             id: '103232',
             'address': 'fsdfsdfdsf'
           },
           
         ]
      }
    },
    mounted () {
      this.$store.commit('UPDATE_POSITION', this.position)
    },
    methods:{
      gotoDetail (item) {
        this.$router.push('incomeDetail?id' + item.id)
      }
    }
  }
</script>

<style lang="less" scoped>
  
  </style>
